import requests
def getverify():
    # 添加头
    header = {'Connection': 'Keep-Alive',
            'User-Agent': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',
              }
    # 参数
    p = {"user": "ceshixiaobaibai",
         "pass": "123456",
         "softid": '96001',
         "codetype": "1902",
         }
    # 打开图片
    userfile = open("./verify.png", "rb").read()#rb读成二进制数
    # 封装
    userfile = {"userfile": ('verify.png', userfile)}
    "2022-4-2"
    # 发送请求，获取验证码
    result=requests.post('http://upload.chaojiying.net/Upload/Processing.php', data=p, files=userfile, headers=header)
    v = result.json()["pic_str"]
    return v
    "要合并的文件2222"
    "merge this file"
    "123"
    "456"
    "678"
    "master1"

if __name__ == '__main__':
    getverify()